package com.dxq.test.bean;

import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.dxq.test.db.Breed;
import com.dxq.test.db.Vaccine;

import java.io.Serializable;

/**
 * Author: zsh
 * Date: 2023/12/6
 * Describe: 提醒
 */
public class RemindEntity implements MultiItemEntity, Serializable, Comparable<RemindEntity> {

    public static final int TYPE_B = 0;//breed  配种
    public static final int TYPE_V = 1;//vaccine  防治

    private int type;
    private String info;//内容提醒
    private String typeRemind;//提醒类别
    private long timeSpan;//时间间隔
    private Breed breed;
    private Vaccine vaccine;

    public RemindEntity() {

    }

    public RemindEntity(String info) {
        this.info = info;
    }

    public RemindEntity(int type) {
        this.type = type;
    }

    public RemindEntity(int type, String info, String typeRemind, long timeSpan, Breed breed) {
        this.type = type;
        this.info = info;
        this.typeRemind = typeRemind;
        this.timeSpan = timeSpan;
        this.breed = breed;
    }

    public RemindEntity(int type, String info, String typeRemind, long timeSpan, Vaccine vaccine) {
        this.type = type;
        this.info = info;
        this.typeRemind = typeRemind;
        this.timeSpan = timeSpan;
        this.vaccine = vaccine;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getTypeRemind() {
        return typeRemind;
    }

    public void setTypeRemind(String typeRemind) {
        this.typeRemind = typeRemind;
    }

    public long getTimeSpan() {
        return timeSpan;
    }

    public void setTimeSpan(long timeSpan) {
        this.timeSpan = timeSpan;
    }

    public Breed getBreed() {
        return breed;
    }

    public void setBreed(Breed breed) {
        this.breed = breed;
    }

    public Vaccine getVaccine() {
        return vaccine;
    }

    public void setVaccine(Vaccine vaccine) {
        this.vaccine = vaccine;
    }

    @Override
    public int getItemType() {
        return type;
    }

    @Override
    public int compareTo(RemindEntity o) {
        return (int) (o.getTimeSpan() - this.getTimeSpan());
    }
}
